# jieba中文进行分词的
import jieba

with open('demo.txt','r', encoding='utf-8') as f:
    s=f.read()

lst = jieba.lcut(s)

set1 = set(lst)

d={}
for word in set1:
    if len(word)>2:
        d[word]=0

for item in lst:
    if item in d:
        d[item] = d.get(item)+1

new_list = []
for item in d:
    new_list.append([item,d[item]])
print(new_list)

new_list.sort(key=lambda x:x[1],reverse=True)
print(new_list[:11])

test=input("输入任意字符结束")